clear

capture log close

global yfolder "/disk/homedirs/frenche/research/clean"
global merge "/disk/homedirs/frenche/research/merge"

log using merge.log, replace

set more off

do $yfolder/1996/1996.do
do $yfolder/1997/1997.do
do $yfolder/1998/1998.do
do $yfolder/1999/1999.do
do $yfolder/2000/2000.do
do $yfolder/2001/2001.do
do $yfolder/2002/2002.do
do $yfolder/2003/2003.do
do $yfolder/2004/2004.do
do $yfolder/2005/2005.do
do $yfolder/2006/2006.do
do $yfolder/2007/2007.do
do $yfolder/2008/2008.do
do $yfolder/2009/2009.do
do $yfolder/2010/2010.do
do $yfolder/2011/2011.do
do $yfolder/2012/2012.do
*do $yfolder/2013/2013.do
*do $yfolder/2014/2014.do


clear




use $yfolder/1996/1996.dta
append using $yfolder/1997/1997.dta
append using $yfolder/1998/1998.dta
append using $yfolder/1999/1999.dta
append using $yfolder/2000/2000.dta
append using $yfolder/2001/2001.dta
append using $yfolder/2002/2002.dta
append using $yfolder/2003/2003.dta
append using $yfolder/2004/2004.dta
append using $yfolder/2005/2005.dta
append using $yfolder/2006/2006.dta
append using $yfolder/2007/2007.dta
append using $yfolder/2008/2008.dta
append using $yfolder/2009/2009.dta
append using $yfolder/2010/2010.dta
append using $yfolder/2011/2011.dta
append using $yfolder/2012/2012.dta
*append using $yfolder/2013/2013.dta
*append using $yfolder/2014/2014.dta

sort year
by year: summ

save $merge/merge.dta, replace

log close

clear
